ThinkPHP5


think\controller\Rest
library\think\controller\Rest.php at line 18

Class Rest

Rest

public abstract class Rest


Constructor Summary
void

__construct()

架构函数 取得模板对象实例

Method Summary
protected Response

response(mixed data, String type, integer code)

输出返回数据

Constructor Detail

library\think\controller\Rest.php at line 34

__construct

public void __construct()

架构函数 取得模板对象实例


Method Detail

library\think\controller\Rest.php at line 90

response

protected Response response(mixed data, String type, integer code)

输出返回数据

Parameters:
data - 要返回的数据
type - 返回类型 JSON XML
code - HTTP状态码

ThinkPHP5